<?php // no direct access
defined('_JEXEC') or die('Restricted access');
if(JRequest::getInt('limit'))
	$max=min(array($this->total,JRequest::getInt('limit')));
else
	$max=$this->total;
$stop1=ceil($max/5);
$i=0;?>

<div id="main-body" class="has-full">
<div id="main-content">
<?php if ($this->params->get('show_page_title', 1)) : ?>
<h3 class="title<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">PORTRÆTTER</h3>
<?php endif; ?>
	<?php for ($j = 1; $j <= $stop1; $j++) :
	$stop2=min($j*5,$max);?>
	<div class="clearfix blog">
	<?php for (; $i < $stop2; $i++) : ?>

		<div class="blog-item">
		<div class="item-inner">
		<?php
			$this->item =$this->getItem($i, $this->params);
			echo $this->loadTemplate('item');
		?>
		</div>
		</div>

	<?php endfor; ?>
	</div>
	<?php endfor; ?>
</div>

<?php if ($this->params->def('show_pagination', 2) == 1  || ($this->params->get('show_pagination') == 2 && $this->pagination->get('pages.total') > 1)) : ?>

		<?php echo $this->pagination->getPagesLinks(); ?>
		<br /><br />

<?php if ($this->params->def('show_pagination_results', 1)) : ?>

		<?php echo $this->pagination->getPagesCounter(); ?>

<?php endif; ?>
<?php endif; ?>
</div>